---
title: "Overview"
description: "Ratelimit overrides"
---


Ratelimit overrides are a way to override the ratelimit for specific users or group using an identifier.

## Configure your override

```ts
import { Override } from "@unkey/ratelimit"

const unkey = new Override({
  rootKey: process.env.UNKEY_ROOT_KEY,
})
```

## Use it

```ts
async function handler(request) {

  const identifier = request.getUserId() // or ip or anything else you want

  const override = await unkey.setOverride({
      identifier: identifier,
      limit: 10,
      duration: 60000,
      namespaceName: "email.outbound",
  })
  if (override.error){
    // handle the error here
    console.error(override.error.message);
    return;
  }
  // handle the request here
}
```

There are four main functions to interact with overrides:

- [setOverride](/libraries/ts/ratelimit/override/set-override) Sets an override for a ratelimit.
- [getOverride](/libraries/ts/ratelimit/override/get-override) Gets a ratelimit override.
- [deleteOverride](/libraries/ts/ratelimit/override/delete-override) Deletes an override.
- [listOverrides](/libraries/ts/ratelimit/override/list-overrides) Lists all overrides for a namnespace.
